#include "common.h"
namespace common {
void sortColors(std::vector<int> &nums) {
    int map[3] = {0, 0, 0};
    for (auto e : nums) {
        map[e]++;
    }
    int j = 0;
    for (int i = 0; i < 3; i++) {
        while (map[i] > 0) {
            nums[j++] = i;
            map[i]--;
        }
    }
}
} // namespace common
